package io.xxx.xbutler.core.callback;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * 机器人个人信息补充回调
 * <p>
 * 机器人登录成功，每次推送完登录成功回调后，会将个人信息补充回调推送给商家；
 * 正常情况下此回调的个人信息是最新的机器人个人信息，也有可能出现机器人登录成功但是获取个人信息失败，
 * 这种情况下，此回调的个人信息数据取的是缓存数据，但是机器人可以正常的进行操作；
 *
 * <pre>
 * {
 *     "nType": 1049,
 *     "vcMerchantNo": "",
 *     "vcRobotWxId": "",
 *     "vcRobotSerialNo": "",
 *     "vcSerialNo": "",
 *     "nResult": 1,
 *     "vcResult": "SUCCESS",
 *     "Data": {
 *         "vcRobotWxId": "",
 *         "vcRobotSerialNo": "",
 *         "nSex": 2,
 *         "vcWxAlias": "",
 *         "vcNickName": "",
 *         "vcBase64NickName": "",
 *         "vcHeadImgUrl": "",
 *         "vcWhatsUp": "",
 *         "vcBase64WhatsUp": "",
 *         "vcCountry": "",
 *         "vcProvince": "",
 *         "vcCity": "",
 *         "vcPersonQRCode": "",
 *         "nTrueName": 0,
 *         "vcPhone": ""
 *     },
 *     "nTimeStamp": 1607524115488
 * }
 * </pre>
 */
@Slf4j
@Component
public class _1049Handler extends RobotHandler {

    @Override
    public String name() {
        return "机器人个人信息补充回调";
    }

    @Override
    public boolean supports(int type) {
        return type == 1049;
    }
}
